local manyi = fk.CreateSkill{
    name = "cpt11__manyi",
}

Fk:loadTranslationTable{
    ["cpt11__manyi"] = "蛮裔",
    [":cpt11__manyi"] = "当你登场时，你可以视为使用一张【南蛮入侵】；【南蛮入侵】对你无效。",
}

local U = require "packages/gamemode/pkg/1v1_generals/1v1_util"

manyi:addEffect(U.Debut, {
  can_trigger = function (self, event, target, player, data)
    return target == player and player:hasSkill(manyi.name) and player:canUse(Fk:cloneCard("savage_assault"))
  end,
  on_use = function(self, event, target, player, data)
    player.room:useVirtualCard("savage_assault", nil, player, player.next, manyi.name)
  end,
})

manyi:addEffect(fk.PreCardEffect, {
  anim_type = "defensive",
  is_delay_effect = true,
  can_trigger = function(self, event, target, player, data)
    return player:hasSkill(manyi.name) and data.card.trueName == "savage_assault" and data.to == player
  end,
  on_use = function (self, event, target, player, data)
    data.nullified = true
  end,
})

return manyi